#ifndef SPYNET_NET_IO_BBUFFER_H_
#define SPYNET_NET_IO_BBUFFER_H_

#include "packet_header.h"

namespace Net
{
	struct IoBuffer
	{
	public:
		IoBuffer();
		~IoBuffer();
		
		bool write_data(char* buffer, ushort size);
		bool read_data(char* buffer, ushort size);

		char* get_data();
		ushort get_cur_size();
		ushort get_rest_size();

	public:
		char data_[PacketHeader::PACKET_MAX_SIZE];
		ushort begin_;
		ushort end_;
	};
}

#endif